package com.xinggq.user.service.dto.user;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;

/**
 * 用户分页查询请求
 *
 * @author xinggq
 * @since 2025-01-01
 */
@Data
@Schema(description = "用户分页查询请求")
public class UserPageRequest {

    @Schema(description = "页码，从1开始", example = "1")
    @Min(value = 1, message = "页码必须大于0")
    private Integer pageNum = 1;

    @Schema(description = "每页大小", example = "10")
    @Min(value = 1, message = "每页大小必须大于0")
    @Max(value = 100, message = "每页大小不能超过100")
    private Integer pageSize = 10;

    @Schema(description = "用户名（模糊查询）", example = "admin")
    private String username;

    @Schema(description = "邮箱（模糊查询）", example = "admin@example.com")
    private String email;

    @Schema(description = "手机号（模糊查询）", example = "138")
    private String phone;

    @Schema(description = "真实姓名（模糊查询）", example = "张三")
    private String realName;

    @Schema(description = "用户状态：1-正常，0-禁用", example = "1")
    private Integer status;

    @Schema(description = "是否管理员：0-否，1-是", example = "0")
    private Integer isAdmin;

    @Schema(description = "性别：0-未知，1-男，2-女", example = "1")
    private Integer gender;
}